<?php
// +----------------------------------------------------------------------
// | CompanyValidate 代理验证器
// +----------------------------------------------------------------------
// | Author: cart <xiaozhao755@gmail.com>
// +----------------------------------------------------------------------
// | Datetime: 2017-12-20 09:00:00
// +----------------------------------------------------------------------
// | Copyright: 车保点点
// +----------------------------------------------------------------------
namespace app\admin\validate;

use think\Validate;

class CompanyValidate extends Validate
{
    protected $rule = [
        ['mobile', 'require|unique:company', '请输入用户名|手机号已经存在'],
        ['real_name', 'require', '真实姓名必须填写'],
        ['password', 'require|length:6,20', '请输入密码|密码长度在6位到20位之间'],
        ['province', 'require', '请选择省份'],
        ['city', 'require', '请输入市区'],
        ['dist', 'require', '请输入区域'],
        ['top_cid', 'require', '请选择上级'],
        ['name', 'require', '请输入公司名'],
    ];

    protected $scene = [
        'add' => ['name','province','city','dist','password','top_cid','mobile'],
        'addData' => ['name','province','city','dist','top_cid','mobile'],
        // 'addData' => ['name','province','city','dist','top_cid','mobile'],
    ];

}